// 单行折叠省略
ellipsis()
  text-overflow: ellipsis
  white-space: nowrap;
  overflow: hidden;

// 多行折叠省略
multline-ellipsis($line)
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: $line;
  text-overflow: ellipsis;
  overflow: hidden;

// 取消滚动条
no-scrollbar()
  -ms-overflow-style: none;
  scrollbar-width: none;
  &::-webkit-scrollbar
    width: 0!important;

// 清除浮动
clearfix()
  &::after, &::before
    content: '';
    display: table;
  &::after
    clear: both;

// 扩展可点击区域
extend-click($extend, $position)
  if $position
    position: $position;
  &::after
    content: '';
    position: absolute;
    left: $extend;
    right: $extend;
    top: $extend;
    bottom: $extend;

// 全局遮罩
mask($bg, $index)
  &::after
    content: '';
    z-index: $index ? $index : 1000;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: $bg ? $bg : rgba(0,0,0,0.6);

// 图片加载失败占位
img-box($width, $height)
  width: $width;
  height: $height;
  & > img
    display: inline-block;
    width: 100%;
    height: 100%;
    background-color: #eee;